require('../css/adver.less')
require('../fonts/iconfont.css')

let box1 = document.querySelector('.box1')
let cd = document.querySelector('.cd')

//五秒跳转
let sum = 5
let timeId = setInterval(function () {
    sum--
    cd.innerHTML = sum + 's'
    if (sum == -1) {
        //判定有无本地存储--有则直接跳转主页
        if (localStorage.getItem.user != undefined) {
            location.href = '../page/home.html';
            return
        }
        location.href = 'login.html'

    }
}, 1000)